package org.dromara.business.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.business.domain.GoodsCoupon;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 优惠券业务对象 goods_coupon
 *
 * @author zlj
 * @date 2025-06-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = GoodsCoupon.class, reverseConvertGenerate = false)
public class GoodsCouponBo extends BaseEntity {

    /**
     * 编号
     */
    @NotNull(message = "编号不能为空", groups = { EditGroup.class })
    private Long couponId;

    /**
     * 优惠券名称
     */
    @NotBlank(message = "优惠券名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 抵扣金额
     */
    @NotNull(message = "抵扣金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * 满多少可用
     */
    @NotNull(message = "满多少可用不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal conditionAmount;

    /**
     * 文字介绍
     */
    @NotBlank(message = "文字介绍不能为空", groups = { AddGroup.class, EditGroup.class })
    private String info;

    /**
     * 开始领取时间
     */
    @NotNull(message = "开始领取时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startTime;

    /**
     * 结束领取时间
     */
    @NotNull(message = "结束领取时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endTime;
    /**
     * 优惠券价格
     */
    @NotNull(message = "优惠券价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;


}
